﻿using Domain.Models;
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using Utilities.Strings;

namespace Domain.SeedData
{
    public static class InitAccount
    {
        public static IEnumerable<Account> InitData()
        {
            var users = new List<Account>();
            var password = BitConverter.ToString(
                    new MD5CryptoServiceProvider()
                    .ComputeHash(Encoding.UTF8.GetBytes("Admin"))).Replace("-", "");
            users.Add(new Account
            {
                Id = 1,
                UserName = "Admin",
                NickName = ChineseCharacter.GenerateChineseName(),
                Name = ChineseCharacter.GenerateChineseName(),
                Password = password,

                EntityStatus = EntityStatus.Active,
                CreateBy = "System",
                CreateTime = DateTime.Now,
                UpdateBy = "System",
                UpdateTime = DateTime.Now,
            });
            return users;
        }
    }
}
